<?php

	include("common.php");
	
	$result = mysql_query("SELECT * FROM `197_albums` WHERE `album_id` = " . $_GET['album_id']);
	$row = mysql_fetch_assoc($result);
	
?>
<?php include("header.php"); ?>
<h1>上傳相片</h1>
<form id="upload-image-form" action="#" method="POST">
	<div id="file-uploader">
		
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
			var uploader = new qq.FileUploader({
				element: $("#file-uploader")[0],
				action: 'imageProcess.php',
				params: { 'dirName': '<?php echo $row['dir_name']; ?>'
					, 'albumId': <?php echo $_GET['album_id']; ?> },
				allowedExtensions: [],
				debug: false,
				onComplete: function(id, fileName, responseJSON){ }
			});
		});
	</script>
</form>
<button class="custom" onclick="location.replace('albumFind.php');">返回</button><button class="custom" onclick="location.replace('imageList.php?album_id=<?php echo $_GET['album_id']; ?>');">編輯相片</button>
<?php include("sidebar.php"); ?>
<?php include("footer.php"); ?>